@import './scss/qmk_colors';
@import './scss/themes';
@import './scss/status-bar';

/*
TO REFACTOR: import of style.css
*/

/* prevent draggable elements from being selected */
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');
@import url('https://fonts.googleapis.com/css?family=Roboto');

[draggable] {
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  /* Required to make elements draggable in old WebKit */
  -khtml-user-drag: element;
  -webkit-user-drag: element;
}

body {
  // background-color: #fff;
  padding: 33px 50px 50px;
  font: 14px/1.5 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  // color: #333;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  // color: #222;
  margin: 0 0 20px;
}

/*p, ul, ol, table, pre, dl {
  margin: 0 0 20px; }*/

h1,
h2,
h3 {
  line-height: 1.1;
}

h1 {
  font-size: 28px;
}

// h2 {
//   color: #393939;
// }

// h3,
// h4,
// h5,
// h6 {
//   color: #494949;
// }

a {
  // color: #39c;
  text-decoration: none;
}

// a:hover {
//   color: #069;
// }

a small {
  font-size: 11px;
  // color: #777;
  margin-top: -0.3em;
  display: block;
}

// a:hover small {
//   color: #777;
// }

.wrapper {
  width: 860px;
  margin: 0 auto;
}

blockquote {
  border-left: 1px solid;
  margin: 0;
  padding: 0 0 0 20px;
  font-style: italic;
}

code,
pre {
  font-family: 'Roboto Mono', Monaco, Bitstream Vera Sans Mono, Lucida Console,
    Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New,
    monospace;
  // color: #666;
  font-size: 12px;
  // background: #f1f1f1;
  padding: 4px 4px;
  border-radius: 2px;
}

pre code {
  background: transparent;
  padding: 0px;
}

pre {
  padding: 8px 15px;
  // background: #f8f8f8;
  border-radius: 5px;
  border: 1px solid;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid;
}

dt {
  // color: #444;
  font-weight: 700;
}

// th {
//   color: #444;
// }

img {
  max-width: 100%;
}

header {
  -webkit-font-smoothing: subpixel-antialiased;
}
strong {
  // color: #222;
  font-weight: 700;
}
section {
  padding-bottom: 50px;
  position: relative;
}

small {
  font-size: 11px;
}

hr {
  border: 0;
  // background: #e5e5e5;
  height: 1px;
  margin: 0 0 20px;
}

footer {
  bottom: 50px;
  -webkit-font-smoothing: subpixel-antialiased;
}

@media print, screen and (max-width: 960px) {
  div.wrapper {
    width: auto;
    margin: 0;
  }

  header,
  section,
  footer {
    float: none;
    position: static;
    width: auto;
  }

  header {
    padding-right: 320px;
  }

  section {
    border: 1px solid #e5e5e5;
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 0 20px;
  }

  header a small {
    display: inline;
  }
}
@media print, screen and (max-width: 720px) {
  body {
    word-wrap: break-word;
  }

  header {
    padding: 0;
  }

  header p.view {
    position: static;
  }

  pre,
  code {
    word-wrap: normal;
  }
}
@media print, screen and (max-width: 480px) {
  body {
    padding: 15px;
  }

  header ul {
    width: 99%;
  }
}
@media print {
  body {
    padding: 0.4in;
    font-size: 12pt;
    // color: #444;
  }
}

// header h1 a {
//   color: inherit;
// }

a img {
  vertical-align: middle;
}

#compile,
#fwFile,
#toolbox,
#source,
#export,
#import,
#import-url,
#settings,
#printkeymaps,
#testkeys,
#leavePrint,
#leaveTest,
#resetTest,
#load-default {
  line-height: 120%;
  border-radius: 3px;
  // background-color: #49ad4c;
  // color: white;
  border: 0px solid #000;
  padding: 5px 8px;
  cursor: pointer;
}

button + button {
  margin-left: 4px;
}

#status {
  position: relative;
}

#toggle-terminal-label {
  cursor: pointer;
  position: absolute;
  top: -12px;
  right: 59px;
  color: #f8f8f2;
  opacity: 0;
  transform: scaleY(0);
  transition: all 0.5s ease-out;
}
#toggle-terminal-label.collapsed {
  opacity: 0.5;
  color: #272822;
  top: -22px;
  transform: scaleY(1);
  transition: all 0.25s 0.25s ease-out;
}

#toggle-terminal {
  cursor: pointer;
  position: absolute;
  top: 4px;
  right: 21px;
  width: 36px;
  height: 27px;
  white-space: nowrap;
  color: #f8f8f2;
  margin: 0;
  transition: all 0.5s ease-out;
}

#toggle-terminal.collapsed {
  transition: all 0.5s ease-out;
  top: -25px;
  color: #272822;
  transform: scaleY(-1);
}

#terminal {
  padding: 2px 5px;
  border: 1px solid;
  font-family: 'Roboto Mono', Monaco, 'Bitstream Vera Sans Mono',
    'Lucida Console', Terminal, Consolas, 'Liberation Mono', 'DejaVu Sans Mono',
    'Courier New', monospace;
  white-space: pre-wrap;
  overflow-y: scroll;
  height: 200px;
  resize: none;
  font-size: 12px;
  width: 100%;
  margin: 0px auto;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  display: block;
  transition: all 0.5s ease-out;
}

#terminal.collapsed {
  transition: all 0.5s ease-out;
  height: 0px;
  padding: 0 5px;
}

#compile {
  margin-right: 0px;
}

#fileImport,
#infoPreview {
  display: none;
}

#compile:disabled,
#fwFile:disabled,
#toolbox:disabled,
#source:disabled {
  // background: #ccc;
  // color: #999;
  cursor: unset;
}

select,
input {
  font-family: 'Roboto Mono', Monaco, Bitstream Vera Sans Mono, Lucida Console,
    Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New,
    monospace;
  font-size: 14px;
}

label,
button {
  text-transform: uppercase;
  font: 14px/1.5 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
}

#controller-bottom {
  padding: 5px;
  border-radius: 0px 0px 5px 5px;
  // background: #eee;
  // border-color: #ccc;
  border-style: solid;
  border-width: 0px 1px 1px 1px;
  margin: 0px auto;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  overflow: hidden;
  line-height: 100%;
}

.botctrl {
  display: grid;
  grid-template: auto / 34fr 5fr;
  grid-row-gap: 5px;
}

.botctrl-1-1 {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
}
.botctrl-1-2 {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
}
.botctrl-2 {
  grid-row: 2;
  grid-column: span 2;
  justify-self: start;
}

.layers {
  column-count: 2;
  padding-left: 10px;
  padding-right: 9px;
  // background: #fff;
}

.layer {
  width: 25px;
  height: 25px;
  border-radius: 25px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 1px solid;
  display: flex;
  justify-content: space-around;
  align-items: center;
  line-height: 80%;
  font-size: 80%;
  margin-bottom: 10px;
  // background: #fff;
  // color: #ccc;
}

.layer:hover {
  cursor: pointer;
  // background: #eee;
}

// .layer.active {
//   background: #ccc;
//   color: #fff;
// }

.layer.non-empty {
  font-weight: bold;
  // color: #000;
}

// .layer.active.non-empty {
//   color: #fff;
// }

.split-content::after {
  content: ' ';
  display: block;
  height: 0;
  clear: both;
}

.split-content.fixed {
  position: fixed;
  top: 0px;
  z-index: 1000;
  pointer-events: none;
}

.fixed p {
  // background: #fff;
  margin: 0px;
  padding: 30px 0px;
}

.left-side {
  float: left;
  pointer-events: all;
}

.right-side {
  float: left;
  pointer-events: all;
}

.rigth-side:after {
  content: ' ';
  display: block;
  height: 0;
  clear: both;
}

#visual-keymap {
  // background: #fff;
  border-radius: 5px;
  border: 5px solid;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
}

#visual-keymap {
  position: relative;
}

#visual-keymap:after {
  content: ' ';
  display: block;
  height: 0;
  clear: both;
}

.key {
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  position: absolute;
  box-sizing: border-box;
  white-space: pre-line;
  cursor: pointer;
  line-height: 100%;
  padding: 1px;
  padding-bottom: 3px;
}

// .key:empty {
//   background: #eee;
// }

.key:empty:before {
  content: 'N/A';
  // color: #ccc;
}

.key .remove {
  width: 0px;
  height: 0px;
  overflow: hidden;
  position: absolute;
  right: 0px;
  top: 0px;
  padding-right: 2px;
  // color: #ccc;
  cursor: pointer;
}

.key:hover .remove {
  width: unset;
  height: unset;
}

// .key.active-key {
//   // background: #d4f9d1;
// }

.key-container,
.key-layer {
  font-size: 10px;
}

.key-contents {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  border: 1px solid;
  margin: 0px auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  padding: 1px;
  // background: #fff;
}

// .key-contents:empty {
//   background: #eee;
// }

.key-contents:empty:before {
  content: 'N/A';
}

// .key-contents.active-key {
//   background: #d4f9d1;
// }

.key-layer-input {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  border: 1px solid;
  margin: 0px auto;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  padding: 1px;
  text-align: center;
}

#keycodes {
  position: relative;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  padding: 5px 0px 0px 5px;
  // background: #eee;
  float: left;
  border-radius: 4px;
  border: 1px solid;
}

.keycode {
  width: 32px;
  height: 32px;
  margin: 0px 5px 5px 0px;
  border: 1px solid;
  border-radius: 2px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  user-select: none;
  cursor: move; /* fallback if grab cursor is unsupported */
  cursor: grab;
  cursor: -moz-grab;
  cursor: -webkit-grab;
  // background: #fff;
  float: left;
  font-family: 'Roboto', sans-serif;
  font-size: 70%;
  line-height: 11px;
  white-space: pre-line;
  padding: 1px;
  position: relative;
}

.keycode:active {
  cursor: grabbing;
  cursor: -moz-grabbing;
  cursor: -webkit-grabbing;
  z-index: 1001;
}

.keycode:empty:after {
  content: 'N/A';
}

.keycode-container,
.keycode-layer,
.keycode-layer-container {
  font-size: 10px;
  display: block;
}

.keycode-container:after,
.keycode-layer-container:after,
.keycode-layer:after {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid;
  // background: #eee;
  margin: 0px auto;
  display: block;
}

.keycode[title]:before {
  content: '';
  position: absolute;
  right: 0px;
  top: 0px;
  border-left: 5px inset;
  border-top: 5px inset;
}

.keycode-1250 {
  width: 41.25px;
}
.keycode-1500 {
  width: 50.5px;
}
.keycode-1750 {
  width: 59.75px;
}
.keycode-2000 {
  width: 69px;
}
.keycode-2250 {
  width: 78.25px;
}
.keycode-2750 {
  width: 96.75px;
}
.keycode-4000 {
  width: 144.75px;
}
.keycode-6250 {
  width: 226.25px;
}

.keycode-select {
  border: solid 2px !important;
}

.space {
  height: 32px;
  margin: 0px 5px 5px 0px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  user-select: none;
  float: left;
  font-size: 70%;
  line-height: 99%;
}

.space-250 {
  width: 4.25px;
}
.space-500 {
  width: 13.5px;
}
.space-750 {
  width: 22.75px;
}
.space-1000 {
  width: 32px;
}
.space-1250 {
  width: 41.25px;
}
.space-1500 {
  width: 50.5px;
}
.space-3500 {
  width: 124.5px;
}
.space-0 {
  width: 0px;
  margin: 0px;
  clear: left;
}
.space-label {
  width: 100%;
  clear: both;
  height: 20px;
  font-size: 12px;
  justify-content: left;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}

.hint {
  font-size: 13px;
  font: 14px/1.5 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin-left: 5px;
}

#favorite-keyboard,
#favorite-colorway {
  cursor: pointer;
}
#favorite-colorway {
  float: right;
}
@media print {
  .backend-status,
  .random-potato,
  .openSettings,
  .print-controls,
  footer {
    display: none;
  }
  input,
  textarea {
    border-width: 0;
  }
}

.random-potato {
  color: #2c3e50;
  font-family: 'Roboto', sans-serif;
}
